<template>
  <div class="customerStatistics">
    <div class="title">群成员分析<span class="icon">指标说明</span>
    </div>
    <ul class="tabList">
      <li :class="active==0?`active`:``" @click="getActive(0)">入群明细</li>
      <li :class="active==1?`active`:``" @click="getActive(1)">退群明细</li>
      <div class="tips">
        <el-tooltip placement="top">
          <div slot="content" class="tooltipContent">
            <div class="top-center">
              <p>统计客户群数：筛选条件下，有入群/退群的客户群个数</p>
              <p>入群总人次：筛选条件下，入群的总人次，不去重</p>
              <p>退群总人次：筛选条件下，退群的总人次，不去重</p>
            </div>
            <div class="bottom-center">
              <p>注意：</p>
              <p>入群/退群明细自2023年10月25日功能上线后开始统计</p>
              <p>每条记录的群信息只保留当天的信息，次日后群信息有变更，列表中不会修正</p>
              <p>仅保留近90天的数据</p>
            </div>
          </div>
          <i class="el-icon-question"></i>
        </el-tooltip>
      </div>
    </ul>
    <groupJoiningDetails v-if="active==0"></groupJoiningDetails>
    <groupExitDetails v-if="active==1"></groupExitDetails>
  </div>
</template>
<script>
import {listUser} from "@/api/system/user";
import {getTime} from "@/utils";

export default {
  name: "groupMemberAnalysis",
  components: {
    'groupJoiningDetails': () => import('./groupJoiningDetails.vue'),
    'groupExitDetails': () => import('./groupExitDetails.vue'),
  },
  data() {
    return {
      active:0,
    }
  },
  watch: {},
  computed: {
  },
  created() {
    //this.getList();

  },
  methods: {
    getActive(index){
      this.active=index;
    },
  },
}
</script>


<style scoped lang="scss">
.title {
  display: flex;
  align-items: center;
  padding: 16px 0 0;
  font-weight: bold;
  font-size: 16px;
  margin-bottom:15px;
  position: relative;

  .icon {
    font-size: 12px;
    font-weight: 400;
    color: #3070ff;
    margin-left: 10px;
  }
  .time {
    position: absolute;
    right: 0px;
    top: 10px;
    color: #8C8C8C;
    font-size: 12px;
    font-weight: 400;
  }
}
.tabList {
  height: 40px;
  display: flex;
  align-items: center;
  margin-bottom: 10px;
  li {
    border: 1px solid #eee;
    padding: 0px 20px;
    list-style: none;
    height: 32px;
    display: flex;
    align-items: center;
    cursor: pointer;
    &.active {
      color: #3070ff;
      background: #fff;
      border-color: #3070ff;
    }
  }
  .tips{
    margin-left: 10px;
  }
}
.tooltipContent {
  width: 500px;
  p {
    line-height: 30px;
    padding: 0px;
    margin: 0px;
  }
  .bottom-center {
    margin-top: 50px;
  }
}
</style>
